home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / flying-6.11 / pool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-30  |  1.2 KB  |  68 lines

  1. #ifndef _pool_h
  2. #define _pool_h
  3.  
  4. #ifndef _real_h
  5. #    include "real.h"
  6. #endif
  7. #ifndef _billard_h
  8. #    include "billard.h"
  9. #endif
  10.  
  11. class Pocket;
  12. class PocketConnector;
  13.  
  14. class Pool : public Billard {
  15.     public:
  16.         static Real TableWidth;
  17.         static Real TableHeight;
  18.  
  19.     public:
  20.         Pool(double dx=TableWidth, double dy=TableHeight);
  21.         virtual ~Pool();
  22.  
  23.         void InitArea( double wx, double wy );
  24.         void InitTable( double Rad = 0.0 );
  25.         virtual void InitPlayground();
  26.         virtual void DrawBackground() const;
  27.  
  28.         int SelectTable( int col );
  29.  
  30.         virtual const Real & GetNormalBallSize()         const;
  31.  
  32.         virtual void InPocket( Ball *b );
  33.         virtual void AllBallsStopped();
  34.         virtual int  IsSelectable(Ball *b);
  35.  
  36.     protected:
  37.         Pocket                *p[6];
  38.         Ball                    *cueball;
  39.         Vec2                    cuedef;                // Default for cueball
  40.         Vec2                    tridef;                // Triangle-Position
  41.  
  42.         int    cue_in_pocket;
  43.  
  44.         void Triangle( double x, double y );
  45.                          Real po;                    // Offset von KeeperLine
  46.  
  47.         ColorId        cue_col;
  48.         ColorId        pocket_col;
  49.  
  50.     private:
  51.         static const int  nPockets;
  52.  
  53.         PocketConnector    *pcon;
  54.  
  55.  
  56.     public:
  57.         static Real Offset;
  58.         static Real PocketRadius;
  59.         static Real BallRadius;
  60.         static Real EdgeRadius;
  61.         static Real EdgeAngle;
  62.         static Real MidAngle;
  63.         static Real    PocketHeight;
  64.         static Real PocketFrame;
  65. };
  66.  
  67. #endif
  68.